<?php

namespace App\Http\Controllers\Home;

use App\Models\Member;

class PassportController extends BaseController
{

    public function __construct(Member $member)
    {
        parent::__construct();
        $this->member = $member;
    }

     public function postLogin(){
         $res = $this->member->logindo(request());
         echo json_encode($res);
     }

     public function postRegisterDo(){
          if ($_POST['type']=='step1') {
              $res = $this->member->regster_step1(request());
          }else{
              $res = $this->member->regster_step2(request());
          }
          echo json_encode($res);
     }

}